package com.monitor.service;

import com.monitor.modelExt.AdminExt;
import com.monitor.modelExt.RightsExt;
import com.monitor.pubInter.IBaseService;
import com.monitor.pubInter.exception.SkException;
import com.monitor.searchExt.AdminSearchExt;

import java.util.List;

/**
*    @author afeng
*    @Date 2025-03-17 10:50:13
*    @description AdminService      系统用户
*/
public interface IAdminService extends IBaseService<AdminExt, AdminSearchExt,String> {

    /**
     * 用户登录
     *
     * @param username
     * @param password
     * @return
     * @throws SkException
     */
    AdminExt loginByUsernameAndPsw(String username, String password) throws SkException;


    /**
     * 根据用户名得到员工详情
     *
     * @param username
     * @return
     */
    AdminExt getInfoByUsername(String username);

    /**
     * 根据手机号码查询
     * @param phone
     * @return
     */
    AdminExt getInfoByPhone(String phone);



    List<RightsExt> getAllRightsListByStaffId(String staffId, boolean cache);

    /**
     * 得到一个所有权限
     * @param staffId
     * @return
     */
    List<String> getAllRightsIdsByStaffId(String staffId);

    /**
     * 删除某一个人的缓存权限
     * @param staffId
     */
    void  clearRightsByStaffId(String staffId);


}